import type { SidebarNavItem } from '@/types/nav';

export const docsApi: SidebarNavItem[] = [
  {
    description: 'Plate API.',
    headings: [],
    href: '/docs/api/plate',
    title: 'Plate',
  },
  {
    description: 'Slate API.',
    headings: [],
    href: '/docs/api/slate',
    items: [
      {
        href: '/docs/api/slate/editor-api',
        title: 'Editor API',
        titleCn: '编辑器 API',
      },
      {
        href: '/docs/api/slate/editor-transforms',
        title: 'Editor Transforms',
      },
      {
        href: '/docs/api/slate/node',
        title: 'Node',
      },
      {
        href: '/docs/api/slate/element',
        title: 'Element',
      },
      {
        href: '/docs/api/slate/text',
        title: 'Text',
      },
      {
        href: '/docs/api/slate/path',
        title: 'Path',
      },
      {
        href: '/docs/api/slate/point',
        title: 'Point',
      },
      {
        href: '/docs/api/slate/range',
        title: 'Range',
      },
      {
        href: '/docs/api/slate/location',
        title: 'Location',
      },
      {
        href: '/docs/api/slate/location-ref',
        title: 'Location Ref',
      },
      {
        href: '/docs/api/slate/operation',
        title: 'Operation',
      },
    ],
    label: 'v42',
    title: 'Slate',
  },
  {
    description: 'Core utilities for Plate.',
    headings: [
      'createAtomStore',
      'createDeserializeAstPlugin',
      'createHtmlPlugin',
      'createEditorProtocolPlugin',
      'createEventEditorPlugin',
      'createHistoryPlugin',
      'createInlineVoidPlugin',
      'createInsertDataPlugin',
      'createPlateEditor',
      'createSlatePlugin',
      'createPrevSelectionPlugin',
      'createPlatePlugin',
      'getPlugin',
      'getPluginInjectProps',
      'getPluginOptions',
      'getPluginType',
      'Hotkeys',
      'toggleBlock',
      'useEditorRef',
      'useEditorState',
      'useElement',
      'useEditorReadOnly',
      'useEditorSelection',
      'useEditorVersion',
      'useSelectionVersion',
      'withPlate',
      'withTReact',
    ],
    href: '/docs/api/core',
    items: [
      {
        headings: [
          'PlateProps',
          'PlateContent',
          'id',
          'children',
          'decorate',
          'disableCorePlugins',
          'editableProps',
          'editableRef',
          'editor',
          'firstChildren',
          'initialValue',
          'normalizeInitialValue',
          'onChange',
          'plugins',
          'renderEditable',
          'renderElement',
          'renderLeaf',
          'value',
        ],
        href: '/docs/api/core/plate-components',
        title: 'Plate Components',
        titleCn: 'Plate 组件',
      },
      {
        headings: [
          'id',
          'dom',
          'plugins',
          'meta',
          'getApi',
          'getTransforms',
          'getPlugin',
          'getType',
          'init',
          'getOption',
          'getOptions',
          'setOption',
          'setOptions',
          'getOptionsStore',
          'DebugPlugin',
          'log',
          'info',
          'warn',
          'error',
          'HtmlPlugin',
          'deserialize',
          'ReactPlugin',
          'reset',
          'SlateReactExtensionPlugin',
          'redecorate',
          'setValue',
        ],
        href: '/docs/api/core/plate-editor',
        title: 'Plate Editor',
        titleCn: 'Plate 编辑器',
      },
      {
        headings: [
          'key',
          'api',
          'transforms',
          'options',
          'handlers',
          'inject',
          'nodeProps',
          'excludePlugins',
          'excludeBelowPlugins',
          'isBlock',
          'isElement',
          'isLeaf',
          'maxLevel',
          'plugins',
          'targetPluginToInject',
          'targetPlugins',
          'node',
          'isDecoration',
          'rules',
          'affinity',
          'isInline',
          'isContainer',
          'clearOnEdge',
          'isMarkableVoid',
          'isSelectable',
          'isStrictSiblings',
          'rules.break',
          'isVoid',
          'type',
          'component',
          'leafProps',
          'props',
          'textProps',
          'override',
          'components',
          'enabled',
          'parser',
          'parsers',
          'html',
          'htmlReact',
          'render',
          'aboveEditable',
          'aboveNodes',
          'aboveSlate',
          'afterEditable',
          'beforeEditable',
          'belowNodes',
          'belowRootNodes',
          'leaf',
          'as',
          'shortcuts',
          'useOptionsStore',
          'dependencies',
          'priority',
          'decorate',
          'extendEditor',
          'useHooks',
          'editOnly',
          'configure',
          'extend',
          'extendPlugin',
          'withComponent',
          'overrideEditor',
          'extendApi',
          'extendEditorApi',
          'extendTransforms',
          'extendEditorTransforms',
          'extendSelectors',
          'editor',
          'plugin',
          'getOption',
          'getOptions',
          'setOption',
          'setOptions',
        ],
        href: '/docs/api/core/plate-plugin',
        title: 'Plate Plugin',
        titleCn: 'Plate 插件',
      },
      {
        headings: ['useEventEditorSelectors', 'useEventPlateId'],
        href: '/docs/api/core/plate-store',
        title: 'Plate Store',
        titleCn: 'Plate 存储',
      },
      {
        headings: [
          'platecontroller-store',
          'state',
          'activeId',
          'primaryEditorIds',
          'editorStores',
          'usage-patterns',
          'specific-editor-by-id',
          'active-editor',
          'dealing-with-fallback-editors',
        ],
        href: '/docs/api/core/plate-controller',
        title: 'Plate Controller',
        titleCn: 'Plate 控制器',
      },
    ],
    title: 'Plate Core',
    titleCn: 'Plate 核心',
  },
  {
    description: 'Additional utilities for Plate.',
    headings: [],
    href: '/docs/api/utils',
    title: 'Plate Utils',
    titleCn: 'Plate 工具',
  },
  {
    description: 'React utilities.',
    headings: [
      'PortalBody',
      'Text',
      'Box',
      'createPrimitiveComponent',
      'createSlotComponent',
      'withProviders',
    ],
    href: '/docs/api/react-utils',
    title: 'React Utils',
    titleCn: 'React 工具',
  },
  {
    description: 'Class utilities.',
    headings: ['cn', 'withCn', 'withProps', 'withVariants'],
    href: '/docs/api/cn',
    title: 'cn',
    titleCn: 'cn',
  },
  {
    description: 'API reference for @platejs/floating',
    headings: [],
    href: '/docs/api/floating',
    title: 'Floating',
    titleCn: 'Floating',
  },
  {
    description: 'API reference for @platejs/resizable',
    headings: [],
    href: '/docs/api/resizable',
    title: 'Resizable',
    titleCn: 'Resizable',
  },
];
